package com.lss.cloud.config;

import org.springframework.cloud.client.loadbalancer.LoadBalanced;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.client.RestTemplate;

/**
 * 2024/3/19-16:43
 * 功能:
 */
@Configuration
public class RestTemplateConfig {
    @Bean
    @LoadBalanced
    //凡是可能存在多个服务提供的都要进行负载均衡
    public RestTemplate restTemplate(){
        return new RestTemplate();
    }
}
